package com.wuming.house.service.impl;

import com.wuming.house.core.BusinessException;
import com.wuming.house.dao.AboutusMapper;
import com.wuming.house.model.Aboutus;
import com.wuming.house.service.AboutusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("aboutusService")
public class AboutusServiceImpl implements AboutusService {

    @Autowired
    private AboutusMapper aboutusMapper;

    @Override
    public void saveAboutus(Aboutus us) throws BusinessException {
        aboutusMapper.insert(us);
    }

    @Override
    public void modifyAboutus(Aboutus us) throws BusinessException {
        aboutusMapper.updateByPrimaryKey(us);
    }

    @Override
    public Aboutus getAboutusById(Long id) throws BusinessException {
        return aboutusMapper.selectByPrimaryKey(id);
    }
}
